package cn.com.infcn.spring.beans.factory;

import java.util.HashMap;
import java.util.Map;

public class StaticCarFactory {
	private static Map<String, Car> cars = new HashMap<String,Car>();
	
	static {
		cars.put("audi", new Car("Audi", 300000));
		cars.put("ford", new Car("Frod", 200000));
	}
	
	public static Car getCar(String name){
		return cars.get(name);
	}
	
	
}
